import request from '@/utils/request'

// 查询不达标项列表
export function listUnstand(query) {
  return request({
    url: '/productionProcess/unstand/list',
    method: 'get',
    params: query
  })
}

// 查询不达标项列表2
export function listUnstand2(query) {
  return request({
    url: '/productionProcess/unstand/listKan',
    method: 'get',
    params: query
  })
}




// 查询数据
export function getinternalControl(query) {
  return request({
    url: '/productionProcess/unstand/getinternalControl',
    method: 'get',
    params: query
  })
}
// 查询不达标项详细
export function getUnstand(id) {
  return request({
    url: '/productionProcess/unstand/' + id,
    method: 'get'
  })
}

// 新增不达标项
export function addUnstand(data) {
  return request({
    url: '/productionProcess/unstand',
    method: 'post',
    data: data
  })
}

// 修改不达标项
export function updateUnstand(data) {
  return request({
    url: '/productionProcess/unstand',
    method: 'put',
    data: data
  })
}

// 删除不达标项
export function delUnstand(id) {
  return request({
    url: '/productionProcess/unstand/' + id,
    method: 'delete'
  })
}


// 不达标趋势
export function reachStandardCount1(query) {
  return request({
    url: '/productionProcess/unstand/reachStandardCount1',
    method: 'put',
    data: query
  })
}

// 数据统计
export function KanbanLeft(query) {
  return request({
    url: '/productionProcess/analysis_singelproduction/KanbanLeft',
    method: 'get',
    params: query
  })
}

// 不达标统计分析
export function reachStandardCount2(query) {
  return request({
    url: '/productionProcess/unstand/reachStandardCount2',
    method: 'put',
    data: query
  })
}


// 不达标统计
export function reachStandardCount3(query) {
  return request({
    url: '/productionProcess/unstand/reachStandardCount3',
    method: 'put',
    data: query
  })
}
